\vsssub
\subsubsection{~$S_{nl}$: Nonlinear Filter} \label{sec:NLS}
\vsssub

\opthead{NLS}{\ws}{H. L. Tolman}

\noindent
When the \dia\ of Eqs.~(\ref{eq:resonance}) and (\ref{eq:snl_dia}) is applied
with a quadruplet where $\lambda_{nl}$ is small enough so that the resulting
quadruplet is {\em not} resolved by the discrete spectral grid, then the
resulting numerical form of the \dia\ corresponds to a simple diffusion
tensor. If this tensor is filtered so that it is applied to the high-frequency
tail of the spectrum only, then a conservative filter results, which retains
all conservation properties of the nonlinear interactions \citep{tol:MMAB08b,
tol:OMOD11}. This filter can be used as a part of a parameterization of
nonlinear interactions.  For instance, it was shown to be effective in
removing high-frequency spectral noise in some \gmd\ configurations in Figs.~5
and 6 of \cite{tol:OMOD11}. Since it is essential that the quadruplet is not
resolved by the spectral grid, the free parameter of the filter defining the
quadruplet is the relative offset of quadruplets 3 and 4 in the discrete
frequency grid ($\alpha_{34}$, $0 < \alpha_{34} < 1$), from which
$\lambda_{nl}$ is computed as

%----------------------------%
% Nonlinear filter           %
%----------------------------%
% eq:nls_a34

\begin{equation}
\lambda_{nl} = \alpha_{34} (X_{\sigma}-1) , \label{eq:nls_a34}
\end{equation}

\noindent 
where $X_{\sigma}$ is the increment factor for the discrete frequency grid, typically $X_{\sigma}=1.1$
[Eq.~(\ref{eq:sigma_grid})]. Using the native spectral description of \ws, the
change in spectral density $\delta N_i$ at quadruplet component $i$, is
written in the form of a discrete diffusion equation as \citep[page
294]{tol:OMOD11}

% eq:nls_dist
% eq:nls_S

\begin{equation}
\left ( \begin{array}{l} \delta N_3 \\ \delta N_1 \\ \delta N_4 
\end{array} \right ) = 
N_1 \: \left ( \begin{array}{c} 0 \\ 1 \\ 0 \end{array} \right ) +
N_1 \:  \frac{S \Delta t}{N_1}
\left ( \begin{array}{r} 1 \\ -2 \\ 1 \end{array} \right )
 , \label{eq:nls_dist}
\end{equation}
with
\begin{equation}
S = \frac{C_{nlf} \: k^4 \sigma^{12} }{(2\pi)^9 \: g^4 \: c_g }
\left [ \frac{N_1^2}{k_1^2}  \left ( \frac{N_3}{k_3}+\frac{N_4}{k_4} \right ) 
               - 2 \frac{N_1}{k_1} \frac{N_3}{k_3} \frac{N_4}{k_4} \right ]
, \label{eq:nls_S}
\end{equation}

\noindent 
where $C_{nlf}$ is the proportionality constant of the \dia\ used in the
filter.  The \dia\ results in changes $S$ for two mirror-image quadruplets
($S_a$ and $S_b$). A \js\ style filter ($\Phi$) is applied to localize the
smoother at higher frequencies only, with

% eq:nls_filter

\begin{equation}
\Phi(f) = \exp \left [ -c_1 \left ( \frac{f}{c_2 f_p} \right ) ^ {-c_3}
               \right ] ,
\label{eq:nls_filter}
\end{equation}

\noindent
where $c_1$ through $c_3$ are tunable parameters.  The latter three parameters
need to be chosen such that $\Phi(f_p) \approx 0$, $\Phi(f > 3f_p) \approx 1$
and that $\Phi \approx 0.5$ for frequencies moderately larger than $f_p$. This
can be achieved by setting
\begin{equation}
c_1 = 1.25, \:\:\:  \:\:\: c_2 = 1.50, \:\:\:  \:\:\: c_3 = 6.00. 
\label{eq:nls_f_parms}
\end{equation}

 
Accounting for the redistribution of the changes $S_{a,b}$ over the
neighboring discrete spectral grids points, the effective nondimensional
strengths ($\tilde{S}_{a,b}$) of the interactions for both quadruplets become

\begin{equation}
\tilde{S}_a = \Phi(f) M_1 S_a \Delta t / N_1
, \:\:\:
\tilde{S}_b = \Phi(f) M_1 S_b \Delta t / N_1
, \label{eq:nls_tilde_s}
\end{equation}

\noindent 
where $N_1$ is the action density at the center component of the quadruplet,
and $M_1$ is a factor accounting for the redistribution of the contribution
over the discrete spectral grid \citep[for details, see][]{tol:OMOD11}. To
convert this \dia\ into a stable diffusive filter, $|\tilde{S}_{a,b}|$ should
be limited to $\tilde{S}_{\max} \approx 0.5$ \citep[e.g.,][]{bk:Fle88}. The
maximum change is distributed over the two quadruplets using

\begin{equation}
\tilde{S}_{m,a} = 
   \frac{|\tilde{S}_a|\tilde{S}_{\max}}{|\tilde{S}_a|+|\tilde{S}_b|}
 , \:\:\:
\tilde{S}_{m,b} = 
   \frac{|\tilde{S}_b|\tilde{S}_{\max}}{|\tilde{S}_a|+|\tilde{S}_b|}
 ,
\label{eq:nls_limit_2D}
\end{equation}

\noindent
and the normalized changes $\tilde{S}_a$ and $\tilde{S}_b$ are limited as

\begin{equation}
- \tilde{S}_{m,a} \leq \tilde{S}_a \leq \tilde{S}_{m,a}, \:\:\:
- \tilde{S}_{m,b} \leq \tilde{S}_b \leq \tilde{S}_{m,b}.
\label{eq:nls_limit}
\end{equation}

\noindent 
With this, the free parameters of the conservative nonlinear filter are
$\alpha_{34}$ in Eq.~(\ref{eq:nls_a34}), $C_{nlf}$ in Eq.~(\ref{eq:nls_S}),
$\tilde{S}_{\max}$ in Eq.~(\ref{eq:nls_limit_2D}), and $c_1$ through $c_3$ in
Eq.~(\ref{eq:nls_filter}). All these parameters can de adjusted by the user
through the namelist {\F snls} in {\file ww3\_grid.inp} (parameters {\F a34} ,
{\F fhfc}, {\F dnm}, {\F fc1}, {\F fc2} and {\F fc3}, respectively).  Note
that this filter is applied in addition to a parameterization of $S_{nl}$, but
does not replace it. Hence, it is used on concert with a full parameterization
of $S_{nl}$, described in the preceding sections.
